#ifndef _H_CC2640R2F_SPI_H_
#define _H_CC2640R2F_SPI_H_

#include "h_cc2640r2f_gpio.h"

////////////////////////////////////////////////////////////////////////////////
#define H_CC2640R2F_SPI0IO                      IOID_11
////////////////////////////////////////////////////////////////////////////////
#define H_CC2640R2F_SPIEnable                   0
#define H_CC2640R2F_SPIDisable                  1

#define H_CC2640R2F_SPI0_CSEnable()             H_CC2640R2F_GPIO_OutputSet(H_CC2640R2F_SPI0IO, H_CC2640R2F_SPIEnable)
#define H_CC2640R2F_SPI0_CSDisable()            H_CC2640R2F_GPIO_OutputSet(H_CC2640R2F_SPI0IO, H_CC2640R2F_SPIDisable)

extern signed char H_CC2640R2F_SPI0_Init(void);
extern signed char H_CC2640R2F_SPI0_Trans(unsigned char *wdata, unsigned char *rdata, \
                                    unsigned short length);
extern void H_CC2640R2F_SPI_Test(void);

#endif
